<?php
/*
* Kusht Mud.
* ----
* The MIT License
* Copyright (c) 2010 Andrew Tutt
* ----
*/

/* MetaText Class
*
* This is the Object Governing Game Meta Text, like Help Files 
* and Other Non-Physical Information Containers
*/

class MetaText {

	public $id; // It's Database Entry
	public $type; // Int that's says what type of Meta_Text it is
	public $topic;
	public $author;
	public $keywords;
	public $firstposted;
	public $lastrevised;

	public $content;
	
	/* -- LOWEST LEVEL FUNCTIONS -- */
	
	// -- Database (Permanent Storage)
	function save() {
		dbHandler::save($this);
	}
	
	function load($id) {
		set_fields_equal($this,dbHandler::load($this,$id));
		rmv_slashes_object($this);
	}
	
	// -- Database Instanced Storage
	function retain() {
		dbHandler::retain($this);
	}
	
	function get_instance($instanceid) {
		set_fields_equal($this,dbHandler::load_instance($this,$instanceid));
		rmv_slashes_object($this);
	}
}

?>